package com.example.project.business.extendPoint.BeanPostProcessor;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;

/**
* @author Hebojin
* @createTime 2023年2月27日 下午2:46:35
* @Description 类描述
*/

//@Component
public class TestBeanPostProcessor implements BeanPostProcessor
{
    
    @Override
    public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException
    {
        if("testPostConstruct".equals(beanName))
        {
            System.out.println("---TestBeanPostProcessor----postProcessBeforeInitialization---------");
        }
        return bean;
    }
    
    @Override
    public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException
    {
        if("testPostConstruct".equals(beanName))
        {
            System.out.println("-----TestBeanPostProcessor--postProcessAfterInitialization---------");
        }
        return bean;
    }
}
